/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author PI-24
 */
package com.test;

import java.io.BufferedWriter;
import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

public class setRepo {
    public void dos()
{
        BufferedWriter out1 = null;


        try {
            FileOutputStream fos;
            DataOutputStream dos;
            out1 = new BufferedWriter(new FileWriter("request.getContextPath() + \\cmr.bat"));
            try {
                out1.write("cd/ " + "\n");
            } catch (IOException ex) {
                System.out.println(ex.getMessage());
            }
            try {
                out1.write("  mkdir" + "mne2" + "\n");
            } catch (IOException ex) {
                System.out.println(ex.getMessage());
            }
            try {
                out1.write("  cd" + " mne2" + "\n");
            } catch (IOException ex) {
                System.out.println(ex.getMessage());
            }
            try {
                out1.write(" svnadmin create proj" + "\n");
            } catch (IOException ex) {
                 System.out.println(ex.getMessage());
            }
            try {
                out1.close();
            } catch (IOException ex) {
                System.out.println(ex.getMessage());
            }
            try {
                // TODO code application logic here
                String command = "cmd.exe /c start request.getContextPath() + \\cmr.bat";
                Runtime rt = Runtime.getRuntime();
                Process pr = rt.exec(command);
            } catch (IOException ex) {
                 System.out.println(ex.getMessage());
            }
        } catch (IOException ex) {
             System.out.println(ex.getMessage());
        }







}

}
